import { $get } from '@js/request'
export interface ConfigSchema {
  'id': string
  'name': string
  'key': string
  'expiration_period': number
  'defence_period': number
  'processing_period': number
  'counterclaim_period': number
  'arbitratorassign_period': number
  'status': number
  'operator': string
  'operatorid': string
  'create_datetime': number
  'orderno': number
  effective_datetime: number
}

// 获取配置列表
export async function getListRequest (): Promise<ConfigSchema[]> {
  const res = await $get('/api/commission/procedure')
  const list: ConfigSchema[] = res.data
  list.forEach((li, i) => {
    li.orderno = i + 1
  })
  return res.data
}
